package com.nb.serv;

public class Config {
	
	
	//MYSQL
	private final static String MYSQL_DRIVER="com.mysql.jdbc.Driver";
	private final static String MYSQL_URL="jdbc:mysql://{0}/{1}";
	
	
	//SQL2005
	private final static String SQL2005_DRIVER="com.microsoft.sqlserver.jdbc.SQLServerDriver";
	private final static String SQL2005_URL="jdbc:sqlserver://{0};databaseName={1}";
	
	public static String getIntance(String resource,String...param){
		for(int i=0;i<param.length;i++){
			String p1 = param[i];
			resource = resource.replace("{"+i+"}", p1);
		}
		return resource;
	}

	public final static String USER_NAME="handchen";
	public final static String PASSWORD="www99qj";
	public final static String URL=getIntance(MYSQL_URL, "mysql.jhost.cn:3306","udb_handchen");
	public final static String DRIVER = MYSQL_DRIVER;
}
